<template>
  <div class="model-form">
    <el-page-header @back="goBack" content="员工详情">
    </el-page-header>
    <el-form class="viewForm" label-width="80px">
      <el-col :span="24">
        <el-form-item label="头像">
          <div v-html="viewModel.avatar"></div>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="姓名">
          <div v-html="viewModel.name"></div>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="电话">
          <div v-html="viewModel.phone"></div>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="个人介绍">
          <div v-html="viewModel.note"></div>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="数据范围">
          <div v-html="viewModel.dataScopeName"></div>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="所在部门">
          <div v-html="viewModel.structureName"></div>
        </el-form-item>
      </el-col>
    </el-form>
  </div>
</template>

<script>
  import common from "@/mixins/common.js";

  export default {
    mixins: [common],
    data() {
      return {
        viewModel: {},
        activeIndex: "1",
      };
    },
    mounted() {
      var id = this.$route.query.id;
      var self = this;
      var data = {};
      data.id = id;

      this.postData("/tenantRest/staff/view.htm", data, function (res) {
        if (res.code == 0) {
          self.viewModel = res;

        }
      });
    },
  };
</script>

<style>
</style>